home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / Chip Temmuz 2004.iso / PCONLiNE / stdweb / ornekler / hesap.php < prev    next >
Encoding:
PHP Script  |  2004-05-05  |  658 b   |  34 lines

  1. <?
  2.  
  3. if (($rakam1 == "") || ($rakam2 == "") || ($hesap =="")) {
  4.     header("Location: form_hesap.html");
  5.     exit;
  6. }    
  7.  
  8. if ($hesap == "topla") {
  9.     $sonuc = $rakam1 + $rakam2;
  10. } else if ($hesap == "cikar") {
  11.     $sonuc = $rakam1 - $rakam2;
  12. } else if ($hesap == "carp") {
  13.     $sonuc = $rakam1 * $rakam2;
  14. } else if ($hesap == "bol") {
  15.     $sonuc = $rakam1 / $rakam2;
  16. }
  17.  
  18. ?>
  19.  
  20. <html>
  21. <head>
  22.     <title></title>
  23.     <meta http-equiv="Content-Type" content="text/html; charset=windows-1254">
  24.     <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-9">
  25. </head>
  26.  
  27.  
  28. <body bgcolor="#ffffff">
  29.  
  30. <b>Sonuτ: <? echo "$sonuc"; ?></b>
  31.  
  32. </body>
  33. </html>
  34.